This article describes the implementation of the Android SMS transmitter. Share to everyone for your reference. Specifically as follows:
Here to simulate the implementation of the Android SMS transmitter
Androidmanifest.xml manifest file:
Main.xml Layout file:
Mainactivity class:
Packag
In the http://blog.csdn.net/cuityanxi/article/details/18413725 I have sample code that gives IR simulation, but it can only be used as a reference;There are still many problems to be used in android. For example, there are many interruptions on the android platform, which may lead to a large delay error. Therefore, I have made some improvements and proved to be r
Digital TV-dtv for us is already not a new thing, in the car electronic DTV mostly in the form of modules independent existence, is worthy. In the car market, customer demand is diverse, if the DTV also do car navigation main PCB up, or not flexible, do not have to DTV is different PCB board, which for after-sale maintenance, development is not a good way.
DTV at home, we are generally through the remote control to operate, of course, now some Android
Digital TV-DTV is no longer a new thing for us. On-board electronics, DTV mostly exists independently in the form of modules and is configurable. In the on-board market, the customer's needs are diverse. If DTV is used as the on-board navigation main PCB, it is still not flexible. If DTV is not used, it must be different PCB boards, this is not a good solution for after-sales maintenance and development.
DTV is at home, and we usually operate through the remote control. Of course, some
Maketext represents a context object, the second parameter is represented as the displayed content, the last parameter is the length of time to display the Toast, Toast.length_long indicates a slightly longer display time, toast.length_ Short indicates a slightly shorter display time, and then don't forget to call the toast's Show method to display it.
Finally, as in the previous chapter of the Phone Dialer, because the app uses system permissions, so to add a user rights to the app, add the
. The fourth parameter is also a pendingintent, and when a message is sent to the recipient, the Pendingintent is broadcast and temporarily null.3. Finally, the right to send text messages to the app, add the following code to the manifest fileandroid:name= "Android.permission.SEND_SMS"/>Finished, you can try, whether in the real machine or simulator, the code is not complex, this is learning something, the function can be better, that is later in the study in the added.Please also give us a lot
This article describes the development of Android Phone Dialer and SMS transmitter implementation methods. Share to everyone for your reference, specific as follows:
Phone Dialer
Realization principle: The user enters the telephone number, when clicks dials, by listens for the object capture, listens for the object through the text control obtains to the user to enter the telephone number, because the sys
, null);}Toast. Maketext (Mainactivity. this, r.string. success, Toast. Length_long). Show ();}}}Three notifications of successful delivery1. Status bar Notification2. dialog box notification3. Spit (Toast) (Eject sent successfully, one second automatically disappears)Set permissionsSend SMS to set permissions, we are in the SDK at docs→index.htmlHere you can see all the permissions search send SMS can see the right to send text messagescan findYou can then request permissions in manifest (under
An Android basic development small case, SMS transmitter:Code Demo diagram:Layout file:Activity_main.xmlJava code: Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. Android Basic development-SMS transmitter
First look at the effect chart:
Layout file:Activity_main.xml
Java code:
Above is the Android SMS transmitter implementation code, I hope to give you a reference, but also hope that we support the cloud habitat community.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.